/**
 *                            License
 * THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS  
 * CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). 
 * THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW.  
 * ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR  
 * COPYRIGHT LAW IS PROHIBITED.
 * 
 * BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND  
 * AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE  
 * MAY BE CONSIDERED TO BE A CONTRACT,
 * THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 
 * HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
 * 
 */
package com.lineage.configure;

import com.lineage.configure.Annotations.Configures;

/**
 * Class <code>ConfigureSQL</code> 数据库设置.
 * 
 * @author jrwz
 * @version 2012-5-23下午09:21:04
 * @see com.lineage.configure
 * @since JDK1.7
 */
public final class ConfigureSQL {

    /** 配置文件路径. */
    private static final String SQL = "./config/sql.properties";

    /** 数据库驱动. */
    @Configures(file = SQL, key = "Driver")
    public static String DB_DRIVER = "com.mysql.jdbc.Driver";

    /** 数据库路径. */
    @Configures(file = SQL, key = "URL")
    public static String DB_URL = //
    "jdbc:mysql://localhost/l1jdb?useUnicode=true&characterEncoding=utf8";

    /** 数据库账号. */
    @Configures(file = SQL, key = "Login")
    public static String DB_LOGIN = "root";

    /** 数据库密码. */
    @Configures(file = SQL, key = "Password")
    public static String DB_PASSWORD = "";

    /** 检查数据库内存泄漏. */
    @Configures(file = SQL, key = "EnableDatabaseResourceLeaksDetection")
    public static boolean DETECT_DB_RESOURCE_LEAKS = false;

    /**
     * 加载.
     */
    public static void load() {
        new ConfigureLoader().load(ConfigureSQL.class);
    }

    /** 数据库设置. */
    private ConfigureSQL() {
    }

}
